package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by twer on 7/10/14.
 */
public class Biblioteca {

    private String welcomeMessage = "Welcome to Biblioteca!";
    private String byeByeMessage = "Bye bye!";
    private List<Book> books = new ArrayList<Book>(){{
                add(new Book(1,"Pride And Prejudice","Jane Austen",1813));
                add(new Book(2,"Harry Potter", "JK Rowling", 1997));}};

    private List<Option> options = new ArrayList<Option>(){{
        add(new Option(1,"Quit",true));
        add(new Option(2,"List Books",true));
        add(new Option(3,"Return Books",true));
        add(new Option(4,"List Movies",true));
        add(new Option(5,"Return Movies",true));
        add(new Option(6,"User Info",false));}};


    private List<Movie> movies =  new ArrayList<Movie>(){{
        add(new Movie(1,"Transformers","Michael Bay",2007,8));
        add(new Movie(2,"Spider Man", "Sam Raimi", 2002,7));}};

    private List<User> users = new ArrayList<User>(){{
        add(new User("000-0001","password","Tom","tom@thoughtworks.com",12345678));
        add(new User("000-0002","password","Jerry","jerry@thoughtworks.com",87654321));}};

    private List<Record> records = new ArrayList<Record>();
    private User loginUser = null;

    public void setBooks(List<Book> list){
        this.books = list;
    }

    public void setOptions(List<Option> list){
        this.options = list;
    }

    public String getWelcomeMessage() {
        return welcomeMessage;
    }

    public List<Book> getBooks() {
        return books;
    }

    public List<Option> getOptions() {
        return options;
    }


    public void setMovies(List<Movie> list) {
       this.movies = list;
    }

    public List<Movie> getMovies() {
        return movies;
    }

    public void setUsers(List<User> list) {
        this.users = list;
    }

    public List<User> getUsers() {
        return users;
    }

    public String getByeByeMessage() {
        return byeByeMessage;
    }

    public void addRecord(Record record) {
        this.records.add(record);
    }

    public void setRecords(List<Record> list) {
        this.records = list;
    }

    public List<Record> getRecords() {
        return records;
    }

    public User getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(User user) {
        this.loginUser = user;
    }

    public void removeRecord(Record record) {
        this.records.remove(record);
    }
}
